/**
 * @Author: 24448
 * @ClassName: Test03
 * @Date: 2021/11/22 17:37
 * @Description: //TODO
 * @Version: V1.0
 **/
public class Test03 {
    private static User user;

    public static User getInstance() {
        return user == null ? new User() : user;
    }

    public static void getInstance2() {
        user = new User();
    }

    public void setUser(User user) {
        this.user = user;
    }

    public void getInstance3() {
        User user = getInstance();
    }

    static class User {

    }
}
